<template>
    <!-- 富文本 -->

    <view class="diy-richText" :style="'padding: ' + itemStyle.paddingTop + 'px ' + itemStyle.paddingLeft + 'px; background: ' + itemStyle.background + ';'">
        <!-- <template is="wxParse" :data="wxParseData:content.nodes"></template> -->
        <mp-html :content="article_content"></mp-html>
    </view>
</template>

<script>
import zanNoticebar from '../../noticebar/index';
export default {
    data() {
        return {
            article_content: ''
        };
    },
    components: {
        zanNoticebar
    },
    options: {
        addGlobalClass: true
    },
    /**
     * 组件的属性列表
     * 用于组件自定义设置
     */
    props: {
        itemIndex: String,
        itemStyle: Object,
        params: Object
    },
    mounted: function () {
        let content = this.params.content; // 富文本转码

        if (content.length > 0) {
            //wxParse.wxParse('content', 'html', content, this, 0)
            this.article_content = this.escape2Html(content);
        }
    }
};
</script>
<style>
@import './richText.css';
</style>
